import Base from '@/common/js/common.js'
import request from '@/common/js/common/request.js'

//查询访客记录信息列表
export function listVisitorRecord(query){
  return request({
    url:'/app/server/visitor/list',
    method:'get',
    params:query
  })
}

//查询访客详细记录信息
export function getVisitorRecord(openId){
  return request({
    url:'/app/server/visitor/' + openId,
    method:'get'
  })
}

//访客预约
export function addVisitorRecord(data){
  return request({
    url:'/app/server/visitor',
    method:'post',
    data:data
  })
}


//删除访客记录
export function deleteVisitorRecord(visitId){
  return request({
    url:'/app/server/visitor/'+visitId,
    method:'delete'
  })
}

//修改审批状态
export function changeVisitorRecordApproverState(data){
  return request({
    url:'/app/server/visitor/changeState',
    method:'put',
    data:data
  })
}



